package me.timlong.dao;

import me.timlong.dataobject.ItemDO;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ItemDOMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(ItemDO record);

    int insertSelective(ItemDO record);

    ItemDO selectByPrimaryKey(Integer id);

    /*
     * 查询商品列表按照销量降序排列
     */
    List<ItemDO> listItem();

    int updateByPrimaryKeySelective(ItemDO record);

    int increaseSalesById(Integer itemId, Integer amount);

    int updateByPrimaryKey(ItemDO record);
}